Computer systems include firmware to provide an interface between the operating system and hardware such as peripheral devices. The firmware is stored in a nonvolatile memory. The firmware for some computer systems includes a Basic Input/Output System (BIOS).
The BIOS includes instructions enabling a processor to identify, initialize, and test components such as peripheral devices of the computer system during the boot process. The devices may be accessed or controlled with BIOS function calls. The BIOS includes tables that may be used to identify the devices and how to communicate with them. The BIOS includes instructions defining some computer system events as well as instructions for how to respond to such events.
In order to resolve latent errors in the firmware, fix inadvertent corruption of the firmware, support additional hardware, or support new features, a firmware modification process can be used to change the BIOS. Various techniques exist for changing the BIOS. After the modification, the user is prompted to reboot the computer to ensure all data structures and function calls, context, etc. are based upon the structures and definitions set forth in the modified firmware rather than the prior version of the firmware.
A number of problems may arise if the user does not timely initiate the reboot. For example, many systems have power management policies that force the computer system to enter into power conservation states based upon varying triggers such as periods of inactivity. The computer may not be able to properly enter into or recover from a power conservation state until after a reboot. If the computer saves context compatible with one version of the firmware and then attempts to restore the context after the firmware is modified, the computer may experience erratic and even harmful behavior. Some applications use a BIOS measurement or firmware metric determined upon boot for security purposes. These metrics and measurements calculated at boot will not reflect the values representing the modified firmware until the next boot. Failure to timely boot again such that these measurements or metrics are re-calculated may expose the computer system to the risk of a security breach.